

void UI_DlgSpline::setSpline(PF_Spline& e) {
    spline = &e;
    //pen = spline->getPen();
    wPen->setPen(spline->getPen(false), true, false, "Pen");
    PF_Graphic* graphic = spline->getGraphic();
    if (graphic!=NULL) {
        cbLayer->init(*(graphic->getLayerList()), false, false);
    }
    PF_Layer* lay = spline->getLayer(false);
    if (lay!=NULL) {
        cbLayer->setLayer(*lay);
    }
	
    QString s;
    s.setNum(spline->getDegree());
	cbDegree->setCurrentText(s);

    cbClosed->setChecked(spline->isClosed());
}



void UI_DlgSpline::updateSpline() {
    spline->setDegree(PF_Math::round(PF_Math::eval(cbDegree->currentText())));
    spline->setClosed(cbClosed->isChecked());
    spline->setPen(wPen->getPen());
    spline->setLayer(cbLayer->currentText());
	spline->update();
}

